package com.dawn.module.hospital.controller.app.tools;

import com.dawn.framework.common.pojo.CommonResult;
import com.dawn.module.hospital.controller.app.tools.vo.AppToolsOcrReqVO;
import com.dawn.module.hospital.service.ToolsService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;


@Tag(name = "用户 APP - 工具集")
@RestController
@RequestMapping("/tools")
@Validated
public class AppToolsController {

    @Resource
    private ToolsService toolsService;

    @PostMapping("/ocr")
    @Operation(summary = "ocr")
    public CommonResult<Long> createMedicalCopy(@Valid @RequestBody AppToolsOcrReqVO reqVO) {
        return toolsService.ocr(reqVO);
    }

    @PostMapping("/ocr-idCard")
    @Operation(summary = "ocr-idCard")
    public CommonResult<Long> ocrIdCard(@Valid @RequestBody AppToolsOcrReqVO reqVO) {
        return toolsService.ocrIdCard(reqVO);
    }


}